let arr = [1,2,3,4,5,6]

Array.prototype.Mymap = function(callback) {
    let result = []
    for(let i = 0; i < this.length; i++) {
        result.push(callback(this[i], i, this))
    }
    return result
}

let a = arr.map(item => item * 2)
console.log(a);